# Maintainer: David Runge <dvzrv@archlinux.org>

_name=Overpass
pkgbase=overpass-fonts
pkgname=(otf-overpass ttf-overpass)
pkgver=3.0.5
pkgrel=2
pkgdesc="Open source web font family"
arch=(any)
url="https://overpassfont.org/"
license=(custom:OFL-1.1 LGPL2.1)
source=(https://github.com/RedHatOfficial/$_name/archive/v$pkgver/$_name-v$pkgver.tar.gz)
sha512sums=('ecddf1e77879da14faf121d4080ad5d0d1e2737d1d45455beb6384bd14662e8898c37f8767f4d87317df524d5946f08b26693198865f12b889ccd91a839cc452')
b2sums=('e9748ab528bee6f0f4dbe2d1fb1a086808905cb00dd1a646a8e245006dec9f306b56b23d5eebc216f3b4088ba9dc84898869fa0fbba9aa345a62a536934245d6')

package_otf-overpass() {
  pkgdesc+=" (Open Type Font)"

  install -vDm 644 $_name-$pkgver/desktop-fonts/overpass{,-mono}/*.otf -t "$pkgdir/usr/share/fonts/OTF/"
  install -vDm 644 $_name-$pkgver/LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 $_name-$pkgver/README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}

package_ttf-overpass() {
  pkgdesc+=" (True Type Font)"

  install -vDm 644 $_name-$pkgver/webfonts/overpass{,-mono}-webfont/*.ttf -t "$pkgdir/usr/share/fonts/TTF/"
  install -vDm 644 $_name-$pkgver/LICENSE.md -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 $_name-$pkgver/README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
